package com.fifth.home.controller.api;

import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.home.service.IZoneBusinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ProjectName: mrcai
 * @Package: com.fifth.home.controller.api
 * @ClassName: ApiZoneBusinessController
 * @Author: 王振华
 * @Description:
 * @Date: 2022/9/13 9:50
 * @Version: 1.0
 */
@RestController
@RequestMapping("/home/zoneBusiness")
@Api(tags = "入驻商家添加中间表接口")
public class ApiZoneBusinessController {
    @Autowired
    private IZoneBusinessService zoneBusinessService;

    @ApiOperation("添加商家接口")
    @ApiImplicitParams(
            {
                    @ApiImplicitParam(value = "专区id(店铺类型)",name = "zoneId",dataType = "Integer"),
                    @ApiImplicitParam(value = "店铺id",name = "bid",dataType = "Integer")
            }
    )
    @PostMapping("/insertBusiness/{zoneId}/{bid}")
    public CommonResult insertBusiness(@PathVariable Integer zoneId,@PathVariable String bid){
        return zoneBusinessService.insert(zoneId,bid);
    }


}
